<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<button id="btn1" onclick="test1()">测试1-打开窗口</button>
		<button id="btn1" onclick="test2()">测试2-关闭窗口</button>
        <button id="btn1" onclick="test3()">测试3-关闭自己</button>
		<script>
            var p;
			function test1()
			{
				// window.open("new.html","new","");
				p=window.open("new.html","new","width=200,height=100");
			}
			
			function test2(){
                p.close();
            }

            function test3(){
                close();
            }
		</script>
	</body>
</html>
